package com.yuexun.dhdoctor.module.meetingMaterial.model.impl;

import com.yuexun.dhdoctor.module.meetingMaterial.api.MeetingMaterialApi;
import com.yuexun.dhdoctor.module.meetingMaterial.bean.MeetingMaterialFeedBack;
import com.yuexun.dhdoctor.module.meetingMaterial.model.IMeetingMaterialFeedBackModel;
import com.yuexun.dhdoctor.util.ApiUtil;

import java.util.Map;

import rx.Observable;

/**
 * Created by work-jx on 2016/12/22.
 */
public class MeetingMaterialFeedBackModel implements IMeetingMaterialFeedBackModel {
    MeetingMaterialApi api;

    private MeetingMaterialApi getApi(){
        if(api!=null){
            return  api;
        }
        return ApiUtil.getInstance().createRetrofitApi(MeetingMaterialApi.class);
    }

    @Override
    public Observable<MeetingMaterialFeedBack> meetingFeedBack(Map<String, String> praise) {
        api=getApi();
        return api.meetingMaterialFeedBack(praise);
    }
}
